package com.apes.enquiry.supplier.baturu.repository;

import com.apes.enquiry.supplier.baturu.model.BaturuAccountInfo;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Map;

public interface BaturuAccountInfoRepository extends CustomRepository<BaturuAccountInfo, String> {

    @Query(value = "SELECT * FROM MAS_BATURU_ACCOUNT_INFO WHERE STORE_ID = ?1 AND ACCOUNT_STATUS != '000003'", nativeQuery = true)
    Map accordStoreFind(String storeId);

    @Query(value = "SELECT BATURU_UNIQUE_SIGN FROM MAS_BATURU_ACCOUNT_INFO WHERE STORE_NUMBER = ?1 AND ACCOUNT_STATUS != '000003'", nativeQuery = true)
    String findByStoreNumber(String storeNumber);
}
